package com.example.dqreptile.service.impl;

import com.example.dqreptile.dao.IPatienceRepository;
import com.example.dqreptile.entity.Patience;
import com.example.dqreptile.service.IPatienceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IPatienceServiceImpl implements IPatienceService {

    @Autowired
    private IPatienceRepository iPatienceRepository;

    @Override
    public Patience save(Patience patience) {
        return this.iPatienceRepository.save(patience);
    }

    @Override
    public Patience findOne(Integer id) {
        return this.iPatienceRepository.findById(id).orElse(null);
    }

}

